package org.wkg.lesson06;

public class SingletonLazy02 {
    private volatile static SingletonLazy02 instance;

    public SingletonLazy02() {
    }

    public static SingletonLazy02 getInstance() {
        if (instance == null) {
            synchronized (SingletonLazy02.class) {
                if (instance == null) {
                    instance = new SingletonLazy02();
                }
            }
        }
        return instance;
    }
}